<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layouts::header"></head>

<body>
<nav th:replace="layouts::navbar"></nav>
    <div class="container">
        <h3>违约情况</h3>
        <hr>
        <a th:href="@{/overTimes/new}" class="btn btn-primary btn-sm mb-3">修改信息</a>
        <br>
        <table class="table table-bordered table-striped">
            <thead class="thread-dark">
            <tr>
                <th>超出天数</th>
                <th>违规次数</th>
                <th>动作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="aOverTime : ${overTimes}">
                <td th:text="${aOverTime.overTime}"></td>
                <td th:text="${aOverTime.disobey}"></td>
                <td>
                    <a th:href="@{/overTimes/update(id=${aOverTime.overTimeId})}" class="btn btn-info btn-sm">更新</a>
                    <a
                        th:href="@{/overTimes/delete(id=${aOverTime.overTimeId})}"
                        class="btn btn-danger btn-sm"
                        onclick="if(!(confirm('确定删除违约记录吗'))) return false"
                    >删除</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</body>
</html>